package com.ksyzt.ksite2.client.service;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.ksyzt.ksite2.shared.PageLoggerData;
import com.ksyzt.ksite2.shared.PageNewsData;
import com.ksyzt.ksite2.shared.modle.ATTACHMENTObj;
import com.ksyzt.ksite2.shared.modle.ATTACHMENTObjs;
import com.ksyzt.ksite2.shared.modle.COLUMNObj;
import com.ksyzt.ksite2.shared.modle.COLUMNObjs;
import com.ksyzt.ksite2.shared.modle.NEWSObj;
import com.ksyzt.ksite2.shared.modle.ORGANIZATIONObj;
import com.ksyzt.ksite2.shared.modle.ORGANIZATIONObjs;
import com.ksyzt.ksite2.shared.modle.PUSERObj;
import com.ksyzt.ksite2.shared.modle.VW_NEWSObj;

public interface ISysManagerAsync
{

    void login(String name, String pwd, AsyncCallback<PUSERObj> callback);

    void checkCurrentUser(AsyncCallback<PUSERObj> callback);

    void quit_sys_console(AsyncCallback<Void> callback);

    void getOrganizations(int userid, int orgtype,
	    AsyncCallback<ORGANIZATIONObjs> callback);

    void getOrganizationChildren(int poid,
	    AsyncCallback<ORGANIZATIONObjs> callback);

    void modifyOrganization(ORGANIZATIONObj org,
	    AsyncCallback<ORGANIZATIONObj> callback);

    void deleteOrganization(int oid, AsyncCallback<Boolean> callback);

    void getAllChildrens(int rootoid, AsyncCallback<ORGANIZATIONObjs> callback);

    void getColumns(int userid, int orgtype, AsyncCallback<COLUMNObjs> callback);

    void deleteColumn(int id, AsyncCallback<Boolean> callback);

    void getAllColumnChildrens(int rootid, AsyncCallback<COLUMNObjs> callback);

    void getColumnChildren(int pid, AsyncCallback<COLUMNObjs> callback);

    void getColumn(int columnid, AsyncCallback<COLUMNObj> callback);

    void modifyColumn(COLUMNObj org, AsyncCallback<COLUMNObj> callback);

    void getNews(int oid, int start, int pagesize,
	    AsyncCallback<PageNewsData> callback);

    void submitNews(NEWSObj news, AsyncCallback<VW_NEWSObj> callback);

    void deleteNews(int nid, AsyncCallback<Void> callback);

    void searchNews(String tag, int start, int pagesize,
	    AsyncCallback<PageNewsData> callback);

    void changeNewsOid(String sb, Integer oid, AsyncCallback<Void> callback);

    void getAttatchments(String nid, AsyncCallback<ATTACHMENTObjs> callback);

    void deleteAttatchment(Integer aid, AsyncCallback<Void> callback);

    void updateAttatchment(ATTACHMENTObj att, AsyncCallback<Void> callback);

	void getLogger(int page, int pagesize,
			AsyncCallback<PageLoggerData> callback);

}
